package name.jiaosha.air.install.controller;

import java.util.List;

import name.jiaosha.air.install.domain.ImportData;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/admin/fix")
public class FixAddController {

	@RequestMapping("/saveNew")
	public ModelAndView save() {

		ModelMap model = new ModelMap();
		model.addAttribute("success", "true");
		// model.addAttribute("root", list);
		return new ModelAndView("jsonView", model);
	}

	@RequestMapping("/saveImport")
	public ModelAndView saveImport(@RequestBody List<ImportData> list) {

		System.out.println(list.size());
		System.out.println(list);
		ModelMap model = new ModelMap();
		model.addAttribute("success", "true");
		// model.addAttribute("root", list);
		return new ModelAndView("jsonView", model);
	}

}
